//
//  SMConfigWinCtrl.swift
//  SmartMachine
//
//  Created by mac on 11/23/19.
//  Copyright © 2019 Smart. All rights reserved.
//

import Cocoa

class SMConfigWinCtrl: SMBaseWindowViewCtrl {
    
    override init(window: NSWindow?) {
        super.init(window: window)
    }
    
    init(window: SMBaseWindow? , winType: SMWindowType) {
        
        var win = window
        if win == nil {
           win = SMBaseWindow.init(contentRect: NSZeroRect, styleMask: [NSWindow.StyleMask.titled , NSWindow.StyleMask.closable, NSWindow.StyleMask.fullSizeContentView, NSWindow.StyleMask.texturedBackground], backing: NSWindow.BackingStoreType.buffered, defer: true)
        }
        win?.windowType = winType
        switch winType {
        case SMWindowType.userWindow:
            win?.title = "用户配置"
        case SMWindowType.basicConfigWindow:
            win?.title = "基础配置"
        case SMWindowType.platFormWindow:
            win?.title = "平台配置"
        default: break
        }
        super.init(window: win)
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    override func windowDidLoad() {
        super.windowDidLoad()
    
        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
    }

}
